package com.bkhc.product.entity;

import com.bkhc.common.annotation.Uid;
import com.bkhc.common.enu.ProductStatusEnum;
import com.bkhc.common.listener.DataEntityListener;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 产品对象
 */
@Entity
@Data
@Table(name = "tbl_product_file")
@EntityListeners({AuditingEntityListener.class, DataEntityListener.class})
public class ProductFile implements Serializable {


    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;
    @Uid
    @Column(name = "file_id")
    private String fileId;

    @Column(name = "file_name")
    private String fileName;

    @Column(name = "product_code")
    private String productCode;

    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;
}
